﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Runtime.Serialization;

namespace ALE_Server.EC
{
    [Serializable]
    [DataContract]
    public class ECFilterSpec
    {
        private IList<ECIncludePattern> m_IncludePattern = new List<ECIncludePattern>();
        private IList<ECExcludePattern> m_ExcludePattern = new List<ECExcludePattern>();

        [DataMember]
        public IList<ECExcludePattern> ExcludePattern
        {
            get
            {
                return m_ExcludePattern;
            }
            set
            {
                m_ExcludePattern = value;
            }
        }

        [DataMember]
        public IList<ECIncludePattern> IncludePattern
        {
            get
            {
                return m_IncludePattern;
            }
            set
            {
                m_IncludePattern = value;
            }
        }

        public void AddExcludePattern(ECExcludePattern pattern)
        {
            m_ExcludePattern.Add(pattern);
        }

        public void RemoveExcludePattern(ECExcludePattern pattern)
        {
            m_ExcludePattern.Remove(pattern);
        }

        public void AddIncludePattern(ECIncludePattern pattern)
        {
            m_IncludePattern.Add(pattern);
        }

        public void RemoveIncldePattern(ECIncludePattern pattern)
        {
            m_IncludePattern.Remove(pattern);
        }

        public override string ToString()
        {
            return XmlSerializeHelper.Serialize(this);
        }
       
    }
}
